Optimal. Leaf size=346 \[ \frac {\left (80 c^2 e-70 b c f+63 b^2 g-64 a c g\right ) x^2 \sqrt {a+b x+c x^2}}{240 c^3}+\frac {(10 c f-9 b g) x^3 \sqrt {a+b x+c x^2}}{40 c^2}+\frac {g x^4 \sqrt {a+b x+c x^2}}{5 c}-\frac {\left (1050 b^3 c f+40 b c^2 (36 c d-55 a f)-945 b^4 g-60 b^2 c (20 c e-49 a g)+256 a c^2 (5 c e-4 a g)-2 c \left (480 c^3 d-40 c^2 (10 b e+9 a f)-315 b^3 g+14 b c (25 b f+46 a g)\right ) x\right ) \sqrt {a+b x+c x^2}}{1920 c^5}+\frac {\left (70 b^4 c f+48 b^2 c^2 (2 c d-5 a f)-32 a c^3 (4 c d-3 a f)-63 b^5 g-40 b^3 c (2 c e-7 a g)+48 a b c^2 (4 c e-5 a g)\right ) \tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{256 c^{11/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.47, antiderivative size = 346, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.152, Rules used = {1667, 846, 793,
635, 212} \begin {gather*} \frac {x^2 \sqrt {a+b x+c x^2} \left (-64 a c g+63 b^2 g-70 b c f+80 c^2 e\right )}{240 c^3}-\frac {\sqrt {a+b x+c x^2} \left (-2 c x \left (-40 c^2 (9 a f+10 b e)+14 b c (46 a g+25 b f)-315 b^3 g+480 c^3 d\right )-60 b^2 c (20 c e-49 a g)+40 b c^2 (36 c d-55 a f)+256 a c^2 (5 c e-4 a g)-945 b^4 g+1050 b^3 c f\right )}{1920 c^5}+\frac {\tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right ) \left (-40 b^3 c (2 c e-7 a g)+48 b^2 c^2 (2 c d-5 a f)+48 a b c^2 (4 c e-5 a g)-32 a c^3 (4 c d-3 a f)-63 b^5 g+70 b^4 c f\right )}{256 c^{11/2}}+\frac {x^3 \sqrt {a+b x+c x^2} (10 c f-9 b g)}{40 c^2}+\frac {g x^4 \sqrt {a+b x+c x^2}}{5 c} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 635
Rule 793
Rule 846
Rule 1667
Rubi steps
\begin {align*} \int \frac {x^2 \left (d+e x+f x^2+g x^3\right )}{\sqrt {a+b x+c x^2}} \, dx &=\frac {g x^4 \sqrt {a+b x+c x^2}}{5 c}+\frac {\int \frac {x^2 \left (5 c d+(5 c e-4 a g) x+\frac {1}{2} (10 c f-9 b g) x^2\right )}{\sqrt {a+b x+c x^2}} \, dx}{5 c}\\ &=\frac {(10 c f-9 b g) x^3 \sqrt {a+b x+c x^2}}{40 c^2}+\frac {g x^4 \sqrt {a+b x+c x^2}}{5 c}+\frac {\int \frac {x^2 \left (\frac {1}{2} \left (40 c^2 d-30 a c f+27 a b g\right )+\frac {1}{4} \left (80 c^2 e-70 b c f+63 b^2 g-64 a c g\right ) x\right )}{\sqrt {a+b x+c x^2}} \, dx}{20 c^2}\\ &=\frac {\left (80 c^2 e-70 b c f+63 b^2 g-64 a c g\right ) x^2 \sqrt {a+b x+c x^2}}{240 c^3}+\frac {(10 c f-9 b g) x^3 \sqrt {a+b x+c x^2}}{40 c^2}+\frac {g x^4 \sqrt {a+b x+c x^2}}{5 c}+\frac {\int \frac {x \left (-\frac {1}{2} a \left (80 c^2 e-70 b c f+63 b^2 g-64 a c g\right )+\frac {1}{8} \left (480 c^3 d-40 c^2 (10 b e+9 a f)-315 b^3 g+14 b c (25 b f+46 a g)\right ) x\right )}{\sqrt {a+b x+c x^2}} \, dx}{60 c^3}\\ &=\frac {\left (80 c^2 e-70 b c f+63 b^2 g-64 a c g\right ) x^2 \sqrt {a+b x+c x^2}}{240 c^3}+\frac {(10 c f-9 b g) x^3 \sqrt {a+b x+c x^2}}{40 c^2}+\frac {g x^4 \sqrt {a+b x+c x^2}}{5 c}-\frac {\left (1050 b^3 c f+40 b c^2 (36 c d-55 a f)-945 b^4 g-60 b^2 c (20 c e-49 a g)+256 a c^2 (5 c e-4 a g)-2 c \left (480 c^3 d-40 c^2 (10 b e+9 a f)-315 b^3 g+14 b c (25 b f+46 a g)\right ) x\right ) \sqrt {a+b x+c x^2}}{1920 c^5}+\frac {\left (70 b^4 c f+48 b^2 c^2 (2 c d-5 a f)-32 a c^3 (4 c d-3 a f)-63 b^5 g-40 b^3 c (2 c e-7 a g)+48 a b c^2 (4 c e-5 a g)\right ) \int \frac {1}{\sqrt {a+b x+c x^2}} \, dx}{256 c^5}\\ &=\frac {\left (80 c^2 e-70 b c f+63 b^2 g-64 a c g\right ) x^2 \sqrt {a+b x+c x^2}}{240 c^3}+\frac {(10 c f-9 b g) x^3 \sqrt {a+b x+c x^2}}{40 c^2}+\frac {g x^4 \sqrt {a+b x+c x^2}}{5 c}-\frac {\left (1050 b^3 c f+40 b c^2 (36 c d-55 a f)-945 b^4 g-60 b^2 c (20 c e-49 a g)+256 a c^2 (5 c e-4 a g)-2 c \left (480 c^3 d-40 c^2 (10 b e+9 a f)-315 b^3 g+14 b c (25 b f+46 a g)\right ) x\right ) \sqrt {a+b x+c x^2}}{1920 c^5}+\frac {\left (70 b^4 c f+48 b^2 c^2 (2 c d-5 a f)-32 a c^3 (4 c d-3 a f)-63 b^5 g-40 b^3 c (2 c e-7 a g)+48 a b c^2 (4 c e-5 a g)\right ) \text {Subst}\left (\int \frac {1}{4 c-x^2} \, dx,x,\frac {b+2 c x}{\sqrt {a+b x+c x^2}}\right )}{128 c^5}\\ &=\frac {\left (80 c^2 e-70 b c f+63 b^2 g-64 a c g\right ) x^2 \sqrt {a+b x+c x^2}}{240 c^3}+\frac {(10 c f-9 b g) x^3 \sqrt {a+b x+c x^2}}{40 c^2}+\frac {g x^4 \sqrt {a+b x+c x^2}}{5 c}-\frac {\left (1050 b^3 c f+40 b c^2 (36 c d-55 a f)-945 b^4 g-60 b^2 c (20 c e-49 a g)+256 a c^2 (5 c e-4 a g)-2 c \left (480 c^3 d-40 c^2 (10 b e+9 a f)-315 b^3 g+14 b c (25 b f+46 a g)\right ) x\right ) \sqrt {a+b x+c x^2}}{1920 c^5}+\frac {\left (70 b^4 c f+48 b^2 c^2 (2 c d-5 a f)-32 a c^3 (4 c d-3 a f)-63 b^5 g-40 b^3 c (2 c e-7 a g)+48 a b c^2 (4 c e-5 a g)\right ) \tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{256 c^{11/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.09, size = 282, normalized size = 0.82 \begin {gather*} \frac {2 \sqrt {c} \sqrt {a+x (b+c x)} \left (945 b^4 g-210 b^3 c (5 f+3 g x)+4 b^2 c (300 c e-735 a g+7 c x (25 f+18 g x))-8 b c^2 \left (-a (275 f+161 g x)+2 c \left (90 d+x \left (50 e+35 f x+27 g x^2\right )\right )\right )+16 c^2 \left (64 a^2 g-a c (80 e+x (45 f+32 g x))+2 c^2 x (30 d+x (20 e+3 x (5 f+4 g x)))\right )\right )+15 \left (-70 b^4 c f-48 b^2 c^2 (2 c d-5 a f)+32 a c^3 (4 c d-3 a f)+63 b^5 g+40 b^3 c (2 c e-7 a g)+48 a b c^2 (-4 c e+5 a g)\right ) \log \left (b+2 c x-2 \sqrt {c} \sqrt {a+x (b+c x)}\right )}{3840 c^{11/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1160\) vs.
\(2(320)=640\).
time = 0.16, size = 1161, normalized size = 3.36 Too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.45, size = 711, normalized size = 2.05 \begin {gather*} \left [\frac {15 \, {\left (32 \, {\left (3 \, b^{2} c^{3} - 4 \, a c^{4}\right )} d + 2 \, {\left (35 \, b^{4} c - 120 \, a b^{2} c^{2} + 48 \, a^{2} c^{3}\right )} f - {\left (63 \, b^{5} - 280 \, a b^{3} c + 240 \, a^{2} b c^{2}\right )} g - 16 \, {\left (5 \, b^{3} c^{2} - 12 \, a b c^{3}\right )} e\right )} \sqrt {c} \log \left (-8 \, c^{2} x^{2} - 8 \, b c x - b^{2} - 4 \, \sqrt {c x^{2} + b x + a} {\left (2 \, c x + b\right )} \sqrt {c} - 4 \, a c\right ) + 4 \, {\left (384 \, c^{5} g x^{4} - 1440 \, b c^{4} d + 48 \, {\left (10 \, c^{5} f - 9 \, b c^{4} g\right )} x^{3} - 8 \, {\left (70 \, b c^{4} f - {\left (63 \, b^{2} c^{3} - 64 \, a c^{4}\right )} g\right )} x^{2} - 50 \, {\left (21 \, b^{3} c^{2} - 44 \, a b c^{3}\right )} f + {\left (945 \, b^{4} c - 2940 \, a b^{2} c^{2} + 1024 \, a^{2} c^{3}\right )} g + 2 \, {\left (480 \, c^{5} d + 10 \, {\left (35 \, b^{2} c^{3} - 36 \, a c^{4}\right )} f - 7 \, {\left (45 \, b^{3} c^{2} - 92 \, a b c^{3}\right )} g\right )} x + 80 \, {\left (8 \, c^{5} x^{2} - 10 \, b c^{4} x + 15 \, b^{2} c^{3} - 16 \, a c^{4}\right )} e\right )} \sqrt {c x^{2} + b x + a}}{7680 \, c^{6}}, -\frac {15 \, {\left (32 \, {\left (3 \, b^{2} c^{3} - 4 \, a c^{4}\right )} d + 2 \, {\left (35 \, b^{4} c - 120 \, a b^{2} c^{2} + 48 \, a^{2} c^{3}\right )} f - {\left (63 \, b^{5} - 280 \, a b^{3} c + 240 \, a^{2} b c^{2}\right )} g - 16 \, {\left (5 \, b^{3} c^{2} - 12 \, a b c^{3}\right )} e\right )} \sqrt {-c} \arctan \left (\frac {\sqrt {c x^{2} + b x + a} {\left (2 \, c x + b\right )} \sqrt {-c}}{2 \, {\left (c^{2} x^{2} + b c x + a c\right )}}\right ) - 2 \, {\left (384 \, c^{5} g x^{4} - 1440 \, b c^{4} d + 48 \, {\left (10 \, c^{5} f - 9 \, b c^{4} g\right )} x^{3} - 8 \, {\left (70 \, b c^{4} f - {\left (63 \, b^{2} c^{3} - 64 \, a c^{4}\right )} g\right )} x^{2} - 50 \, {\left (21 \, b^{3} c^{2} - 44 \, a b c^{3}\right )} f + {\left (945 \, b^{4} c - 2940 \, a b^{2} c^{2} + 1024 \, a^{2} c^{3}\right )} g + 2 \, {\left (480 \, c^{5} d + 10 \, {\left (35 \, b^{2} c^{3} - 36 \, a c^{4}\right )} f - 7 \, {\left (45 \, b^{3} c^{2} - 92 \, a b c^{3}\right )} g\right )} x + 80 \, {\left (8 \, c^{5} x^{2} - 10 \, b c^{4} x + 15 \, b^{2} c^{3} - 16 \, a c^{4}\right )} e\right )} \sqrt {c x^{2} + b x + a}}{3840 \, c^{6}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x^{2} \left (d + e x + f x^{2} + g x^{3}\right )}{\sqrt {a + b x + c x^{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 4.88, size = 330, normalized size = 0.95 \begin {gather*} \frac {1}{1920} \, \sqrt {c x^{2} + b x + a} {\left (2 \, {\left (4 \, {\left (6 \, {\left (\frac {8 \, g x}{c} + \frac {10 \, c^{4} f - 9 \, b c^{3} g}{c^{5}}\right )} x - \frac {70 \, b c^{3} f - 63 \, b^{2} c^{2} g + 64 \, a c^{3} g - 80 \, c^{4} e}{c^{5}}\right )} x + \frac {480 \, c^{4} d + 350 \, b^{2} c^{2} f - 360 \, a c^{3} f - 315 \, b^{3} c g + 644 \, a b c^{2} g - 400 \, b c^{3} e}{c^{5}}\right )} x - \frac {1440 \, b c^{3} d + 1050 \, b^{3} c f - 2200 \, a b c^{2} f - 945 \, b^{4} g + 2940 \, a b^{2} c g - 1024 \, a^{2} c^{2} g - 1200 \, b^{2} c^{2} e + 1280 \, a c^{3} e}{c^{5}}\right )} - \frac {{\left (96 \, b^{2} c^{3} d - 128 \, a c^{4} d + 70 \, b^{4} c f - 240 \, a b^{2} c^{2} f + 96 \, a^{2} c^{3} f - 63 \, b^{5} g + 280 \, a b^{3} c g - 240 \, a^{2} b c^{2} g - 80 \, b^{3} c^{2} e + 192 \, a b c^{3} e\right )} \log \left ({\left | -2 \, {\left (\sqrt {c} x - \sqrt {c x^{2} + b x + a}\right )} \sqrt {c} - b \right |}\right )}{256 \, c^{\frac {11}{2}}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {x^2\,\left (g\,x^3+f\,x^2+e\,x+d\right )}{\sqrt {c\,x^2+b\,x+a}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________